package com.ohc.leetcode.字符串;

/**
 * 2022年5月10日09:10:32
 * 过啦
 */
public class 剑指Offer58II左旋转字符串 {

    public static String reverseLeftWords(String s, int n) {
        StringBuilder builder = new StringBuilder();
        builder.append(s.substring(n, s.length()));
        builder.append(s.substring(0, n));
        return builder.toString();

    }

    public static void main(String[] args) {
        String str = "abcdefg";
        String s = reverseLeftWords(str, 2);
        System.out.println("s = " + s);
    }
}
